#include "IndexBufferMaterial.h"

#include "Material.h"
#include "IndexedGeometry.h"

IndexBufferMaterial::IndexBufferMaterial(IndexedGeometry* ig)
:m_pIndexBuffer(ig),m_pMaterial(NULL),m_MaterialSet(false)
{

}


IndexBufferMaterial::IndexBufferMaterial(IndexedGeometry* ig,Material* material)
:m_pIndexBuffer(ig),m_pMaterial(material)
{

}

IndexBufferMaterial::~IndexBufferMaterial(void)
{
	SAFE_DELETE(m_pIndexBuffer);
	if ( m_pMaterial != NULL ){
		SAFE_DELETE(m_pMaterial);
		m_pMaterial = NULL;
	}
}